package cn.fsd.feignclients;

import cn.fsd.domain.Commodity;
import cn.fsd.domain.CommodityClass;
import cn.fsd.vo.CommodityNameClassBean;
import java.util.List;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "delivery-server",url = "localhost:1020")
public interface DeliveryFeignClient {

  @GetMapping("/commodity/getCommodityById")
  Commodity getTheCommodity(@RequestParam("id") String id);

  @PostMapping("/commodity/getCommodityByClass")
  List<Commodity> getCommodities(@RequestBody CommodityNameClassBean bean);

  @GetMapping("/class/getClassById")
  CommodityClass getClassById(@RequestParam("classId")String classId);
}
